package com.kungfuhacking.wristbandpro.location.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Aaron on 17/4/21.
 */

public class DeviceEntity implements Parcelable {

    private String ver;
    private String location;
    private String provider;
    private String battery;
    private int gsm;
    private boolean online;
    private String phoneNum;
    private String sosPhone;
    private String stuLat;
    private String stuLng;
    private String latitude;
    private String longitude;
    private long updateTime;
    private String sn;

    public String getVer() {
        return ver;
    }

    public void setVer(String ver) {
        this.ver = ver;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getProvider() {
        return provider;
    }

    public void setProvider(String provider) {
        this.provider = provider;
    }

    public String getBattery() {
        return battery;
    }

    public void setBattery(String battery) {
        this.battery = battery;
    }

    public int getGsm() {
        return gsm;
    }

    public void setGsm(int gsm) {
        this.gsm = gsm;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getSosPhone() {
        return sosPhone;
    }

    public void setSosPhone(String sosPhone) {
        this.sosPhone = sosPhone;
    }

    public String getStuLat() {
        return stuLat;
    }

    public void setStuLat(String stuLat) {
        this.stuLat = stuLat;
    }

    public String getStuLng() {
        return stuLng;
    }

    public void setStuLng(String stuLng) {
        this.stuLng = stuLng;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.ver);
        dest.writeString(this.location);
        dest.writeString(this.provider);
        dest.writeString(this.battery);
        dest.writeInt(this.gsm);
        dest.writeByte(this.online ? (byte) 1 : (byte) 0);
        dest.writeString(this.phoneNum);
        dest.writeString(this.sosPhone);
        dest.writeString(this.stuLat);
        dest.writeString(this.stuLng);
        dest.writeString(this.latitude);
        dest.writeString(this.longitude);
        dest.writeLong(this.updateTime);
        dest.writeString(this.sn);
    }

    public DeviceEntity() {
    }

    protected DeviceEntity(Parcel in) {
        this.ver = in.readString();
        this.location = in.readString();
        this.provider = in.readString();
        this.battery = in.readString();
        this.gsm = in.readInt();
        this.online = in.readByte() != 0;
        this.phoneNum = in.readString();
        this.sosPhone = in.readString();
        this.stuLat = in.readString();
        this.stuLng = in.readString();
        this.latitude = in.readString();
        this.longitude = in.readString();
        this.updateTime = in.readLong();
        this.sn = in.readString();
    }

    public static final Parcelable.Creator<DeviceEntity> CREATOR = new Parcelable.Creator<DeviceEntity>() {
        @Override
        public DeviceEntity createFromParcel(Parcel source) {
            return new DeviceEntity(source);
        }

        @Override
        public DeviceEntity[] newArray(int size) {
            return new DeviceEntity[size];
        }
    };
}
